[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Merge several sorted collections into a single sorted collection. Each input collection must be sorted
by the natural ordering of the type (it's implementation of IComparable<T>). The merging
is stable; equal items maintain their ordering, and equal items in different collections are placed
in the order of the collections.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static IEnumerable<T> MergeSorted<T>( params IEnumerable<T>[] collections ) where T : IComparable<T> |
Visual Basic (Declaration) |
---|
Public Shared Function MergeSorted(Of T As IComparable(Of T)) ( _ ParamArray collections As IEnumerable(Of T)() _ ) As IEnumerable(Of T) |
Visual C++ |
---|
public: generic<typename T> where T : IComparable<T> static IEnumerable<T>^ MergeSorted ( ... array<IEnumerable<T>^>^ collections ) |
Parameters
- collections
- array<IEnumerable<(Of <T>)>>[]()
The set of collections to merge. In many languages, this parameter can be specified as several individual parameters.
Return Value
An IEnumerable<T> that enumerates all the items in all the collections in sorted order.Type Parameters
- T
See Also
Algorithms Class
Wintellect.PowerCollections Namespace